Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Evaluate & Execute

"And - If your @formula code works ... shouldn't it be used?"
No. Just because it works now doesn't mean it will always work. Some other programmer may make a mistake in some other code, document fields that should be numeric are now saved as text, and your "working" formula grinds to a halt. Now you have to figure out what's wrong. How do you debug it? By sticking to your old formula, you've just thrown away a major benefit to LotusScript.

And for maintenance purposes, it's easier to find people who know VB and can start updating or migrating LotusScript, than it is to find people who know formula.

By far and away, the biggest use of Evaluate I've seen is to act as a crutch for developers to not have to learn LotusScript.


C API?? Are you nuts?? :P


Erik C. Brooks is correct in that there doesn't appear to be a 255 character limit on Evaluate. I'm trying to review now why I thought that. I think I might have been thinking of @Eval where the argument was extracted using even more formula, and the process imposed a limit of 255 character strings. I don't have the code anymore so I'm trying to remember what it was.

Still, even without the limit, LotusScript is better for dynamic coding for the other reasons given, as well as the fact that you can have UI functions in Execute but not in Evaluate. In fact, you can perform just about any operation you want.

Sub Click(Source As Button)
Dim script As String, retcode As Integer
script$ = {Sub Initialize
Dim documentnode As Variant
Dim eobject As Variant
Dim fullxmlfilename As String
Dim flag As Boolean
Dim parser As NotesDOMParser
Dim stream As NotesStream
Dim thisns As New NotesSession
Dim urldoc As NotesDocument
Dim urlstring As String
urlstring = |http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA&output=xml|
Set urldoc = thisns.CurrentDatabase.GetDocumentByURL( urlstring  )
fullxmlfilename = Environ$ ( "TMP" ) & "\" & "returned.xml"
If Dir( fullxmlfilename ) <> "" Then Kill fullxmlfilename
If urldoc.HasEmbedded Then
Forall item In urldoc.Items
If item.Type = ATTACHMENT Then Set eobject = urldoc.GetAttachment( item.Values( 0 ) )
End Forall
Else
Msgbox( "no embedded objects found")
Exit Sub
End If
Call eobject.extractFile( fullxmlfilename )
Set stream = thisns.CreateStream
flag = stream.Open( fullxmlfilename )
Set parser = thisns.CreateDOMParser( stream )
Call parser.Parse
Set documentnode = parser.Document.DocumentElement
Call stream.Close
Kill fullxmlfilename
msgbox( documentnode.nodename )
End Sub}
retcode% = Execute ( script$ )
End Sub


Feedback response number WLOO7YT233 created by ~Julia Feztoosterader on 12/16/2009

LS Evaluate problem: counter = Eval... (~Yoshi Umnukony... 15.Dec.09)
. . DON'T USE EVALUATE! (~Fred Xanjumima... 15.Dec.09)
. . . . Actually, there's several cases whe... (~Sanjay Quettum... 15.Dec.09)
. . . . . . Name three. (~Fred Xanjumima... 15.Dec.09)
. . . . . . . . Ok, I'll bite. (~Sanjay Quettum... 16.Dec.09)
. . . . . . . . . . re: Ok, I'll bite. (~Fred Xanjumima... 17.Dec.09)
. . . . . . . . . . . . Terseness (~Sanjay Quettum... 17.Dec.09)
. . . . . . . . . . . . . . Actually... (~Fred Xanjumima... 17.Dec.09)
. . . . . . . . . . . . . . . . It definitely depends... (~Sanjay Quettum... 17.Dec.09)
. . . . . . . . . . . . . . . . . . re:no need...Yes you're right. I s... (~Fred Xanjumima... 17.Dec.09)
. . . . . . . . . . . . . . . . Seems like Willy is kind of LotusSc... (~Arnold Zenjumi... 17.Dec.09)
. . . . . . . . Dynamic coding is one ... (~Arnold Zenjumi... 16.Dec.09)
. . . . . . . . . . here's a link to tell you more abou... (~James Preresas... 16.Dec.09)
. . . . . . . . . . . . As expected, Watka makes a comment ... (~Fred Xanjumima... 16.Dec.09)
. . . . . . . . . . Nope. Use Execute instead. (~Fred Xanjumima... 16.Dec.09)
. . . . . . . . . . . . No 255 limit now?!? Where do you ha... (~Arnold Zenjumi... 16.Dec.09)
. . . . . . . . . . . . . . Evaluate & Execute (~Fred Xanjumima... 16.Dec.09)
. . Use variant as return type (~Ned Mintoolita... 15.Dec.09)
. . . . Thank you :-) (~Yoshi Umnukony... 15.Dec.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS